<%@ page language="java"  pageEncoding="utf-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>电子钱包</title>
<link href="https://my.moneymoremore.com/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://my.moneymoremore.com/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="https://my.moneymoremore.com/js/util.js"></script>
</head>
<style>
.black_overlay{
display:none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.registered_005 {
display:none;
position: absolute;
top: 20%;
left: 25%;
width: 50%;
height: 55%;
border: 16px solid lightblue;
background-color: white;
z-index:1002;
}

#hint {
    width: 198px;
    border: 1px solid #000000;
    background: #ffffff;
    position: absolute;
    z-index: 9;
    padding: 6px;
    line-height: 17px;
    text-align: left;
    top: 1520px;
}
</style>
<script language="JavaScript">
		$(function(){
			$("#addbankcard").click(function(){
				$("#MyDiv").css({'display':'block'});
				$("#fade").css({'display':'block'});
				var bgdiv = document.getElementById("fade");
				bgdiv.style.width = document.body.scrollWidth;
			});
		});
		$(function(){
			$("#addbankcard1").click(function(){
				$("#MyDiv").css({'display':'block'});
				$("#fade").css({'display':'block'});
				var bgdiv = document.getElementById("fade");
				bgdiv.style.width = document.body.scrollWidth;
			});
		});
		$(function(){
			$("#closeDiv").click(function(){
				$("#MyDiv").css({'display':'none'});
				$("#fade").css({'display':'none'});
			});
		});
		
		function checkType(){
			document.getElementById("grtId1").style.display="";
			document.getElementById("grtId3").style.display="";
		}
		
		function onCheckType(){
			document.getElementById("grtId1").style.display="none";
			document.getElementById("grtId3").style.display="none";
		}
					

	function showme(){
		var oSon=window.document.getElementById("hint");
		if (oSon==null) return;
		with (oSon){
			style.display="block";
			style.pixelLeft=window.event.clientX+window.document.body.scrollLeft+6;
			style.pixelTop=window.event.clientY+window.document.body.scrollTop+9;
		}
	}
	function hidme(){
		var oSon=window.document.getElementById("hint");
		if (oSon==null) return;
		oSon.style.display="none";
	}
	
	$(function(){
		$("#Province").one("mouseenter",function(){
			var url="/register/provinceInfo.action";
			$.post(url,function(data){
				var d = eval('('+ data +')');
				$(d).each(function() {
					$("#Province").append("<option value="+this[1]+" >"+this[0]+"</option>");
				});							
			});		
		});			
	});
	
	$(function(){
		$("#Province").change(function(){
			$("#City").empty();
			$("#City").append("<option value="+0+">请--选--择</option>");
			var province = $("#Province").val();
			var url="/register/cityInfo.action";
			if(province!=0){
				$.post(url,{cityId:province},function(data){
					var d = eval('('+ data +')');
					$(d).each(function() {
							$("#City").append("<option value="+this[1]+" >"+this[0]+"</option>");
					});
				});
			}
		});
	});
	
//	$(function(){
//				$("#amount").blur(function(){
//					$("#amountMessage").css({'display':'none'});
//					$("#amountMessage3").css({'display':'none'});
//					$("#amountMessage2").css({'display':'none'});
//					$("#amountMessage1").css({'display':'none'});
//					$("#amountMessage4").css({'display':'none'});
//					$("#reality").hide();
//				var reg =/^\d{0,8}\.{0,1}(\d{1,2})?$/;
//				var d1 =$("#totalBalance").text();
//				var d2 =$("#amount").val();
//				var availbalance='0.0';
//					if($("#amount").val()==""){
//						$("#amountMessage").css({'display':'block'});
//					}else if(!reg.test($("#amount").val())){
//						$("#amountMessage3").css({'display':'block'});
//					}else if($("#amount").val()<=1){
//						$("#amountMessage2").css({'display':'block'});
//					}
//					/*
//					else if(d1-d2<0){
//						$("#amountMessage").css({'display':'none'});
//						$("#amountMessage1").css({'display':'block'});
//						$("#amountMessage3").css({'display':'none'});
//						$("#amountMessage2").css({'display':'none'});
//						$("#amountMessage4").css({'display':'none'});
//						$("#reality").hide();
//					}
//					*/
//					else{
//						var url="/withdraw/newFee.action";
//						$.ajax({
//				            type: "POST",
//				            async:false,  // 设置同步方式
//				            cache:false,
//				            url: url,
//				     		data:{amount:d2},
//				            success:function(data)
//				            {
//				     			data=trim(data);
//								var d3=accAdd(d2,data);
//								if(parseFloat(d3)>parseFloat(availbalance))
//								{
//									$("#amountMessage1").css({'display':'block'});
//								}
//								else
//								{
//									$("#amountMessage4").css({'display':'block'});
//									$("#amountMessage4").html('服务费：<span class="orange">'+data+'</span>元');
//									$("#ramount").html(accAdd(d2,data));
//									$("#reality").show();
//								}
//				            }
//						});
//					}
//				});
//			});
			
			$(function(){
				$("#buttion1").click(function(){
				var boolCheck=$('input:radio[name="cardId"]').is(":checked"); 
				$("#amountxxx").blur();
					if(!boolCheck){
						$("#cardMessage").css({'display':'block'});
					}
					if($("#amountMessage").css('display')=='none' 
						&& $("#amountMessage1").css('display')=='none' 
						&& $("#amountMessage2").css('display')=='none' 
						&& $("#amountMessage3").css('display')=='none' 
						&& $("#cardMessage").css('display')=='none')
					{
						var data = $("#myForm").serialize();
						var url="https://my.moneymoremore.com/loan/itrussign.action";
						$.ajax({
					           type: "POST",
					           async:false,  // 设置同步方式
					           cache:false,
					           url: url,
					    		data:{data:data},
					           success:function(data)
					           {
					           	if(data!=null && data!="")
					           	{
					           		$("#itrusdata").val(data);
					           	}
					           }
						});
						
						var targetForm = document.getElementById('myForm');
						    targetForm.action = "addWithdraw.action";
						    targetForm.submit();
					}
				});
			});
function show(obj,id) { 
var objDiv = $("#"+id+""); 
$(objDiv).css("display","block");
} 
function hide(obj,id) { 
var objDiv = $("#"+id+""); 
$(objDiv).css("display", "none"); 
}
</script>
<body>

<script type="text/javascript" src="https://my.moneymoremore.com/js/jquery-1.8.3.js"></script>

	<script type="text/javascript">
		$().ready(function(){
		  	$("li[id^='managermentid']").hover(function(){
		   		$(this).addClass('nav_down');
		   	},function(){
		   		$(this).removeClass('nav_down');
			});
		});
		$(document).ready(function() {
			//获取url中的参数
			function getUrlParam(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
				var r = window.location.search.substr(1).match(reg); //匹配目标参数
				if(r != null) return unescape(r[2]);
				return null; //返回参数值
			}
			var menuindex= getUrlParam('menuindex');

			//alert(menuindex);
			if( menuindex != null) {
				$("#menuindex"+ menuindex).addClass("active");
			}
	    });
        $.ajax({
            //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "detail.do" ,//url
            success:function (result) {
                //alert(result);
                $("#availableBalance").text(result[0]);
                $("#totalBalance").text(result[0]);
            },
            error : function() {
                alert("异常！");
            }
        });
	</script>
	<div id="account">
    <div class="account_top">
      <div class="account_top001">
        <div class="logo"><h1><strong>电子钱包</strong></h1></div>
        <div class="account_top003">
        您好，
        游客
         &nbsp;&nbsp;&nbsp;&nbsp;<a href="file:///C:/Users/Owner/Desktop/%EB%A1%9C%EA%B7%B8%EC%9D%B8%20%EB%B0%B0%EA%B2%BD%20%EC%98%88%EC%A0%9C/CustomLoginFormStyling/%E9%A6%96%E9%A1%B5.html">退出 </a></div>
      </div>
      <div class="account_top002">
        <div class="account_top005">
           <ul>
            <li onclick="showmenu('menu1');" class="nav_bg"> <a href="detail.jsp">我的帐户</a></li>
            <li onclick="showmenu('menu2');" id="managermentid"  style="margin-left:50px;"><a href="transaction.jsp">转账</a></li>
            <li onclick="showmenu('menu3');" id="managermentid1"><a href="find.jsp">查询记录</a></li>
           </ul>
        </div>
      </div>
    </div>
</div>
    <div class="account_center01">
      <div class="management" style="margin: 10px 0px;">
      <div class="transfer_005">转账&nbsp;&nbsp;&nbsp;&nbsp;
      <font style="font-size: 12px;color: red;"></font></div>
      <form action="send.do" id="myForm" theme="simple" method="post">
        <div class="carry_001">
          <div class="carry_001top">
           <div class="carry_topleft" >总余额：<span class="red"><strong id="availableBalance">0.00</strong></span>元
           </div>
          </div>
          <div class="carry_001center">
          <dl>
             <dd>转给地址名：</dd>
             <dt>
              <input type="text" id="address" name="address" class="input_150"  placeholder="请输入地址"/><span class="leftpx_10"></span>
                <p class="carry-center-icon" id="addressMessage0" style="display:none">请输入提现金额</p>
                <p class="carry-center-icon" id="addressMessage1" style="display:none">输入的提现金额超过余额</p>
                <p class="carry-center-icon" id="addressMessage2" style="display:none">输入的提现金额过小</p>
                <p class="carry-center-icon" id="addressMessage3"  style="display:none">请正确输入提现金额</p>
             </dt>
            </dl>
            <dl>
             <dd>转账金额：</dd>
             <dt>
              <input type="text" id="amount" name="amount" class="input_150"  placeholder="请输入转账金额"/><span class="leftpx_10"></span>
                <p class="carry-center-icon" id="amountMessage0" style="display:none">请输入提现金额</p>
                <p class="carry-center-icon" id="amountMessage1" style="display:none">输入的提现金额超过余额</p>
                <p class="carry-center-icon" id="amountMessage2" style="display:none">输入的提现金额过小</p>
                <p class="carry-center-icon" id="amountMessage3"  style="display:none">请正确输入提现金额</p>
             </dt>
            </dl>
            <dl>
              <dd>&nbsp;</dd>
              <dt>
              <span>可提现余额：<span class="orange"><strong id="totalBalance">0.00</strong></span>元</span>
              </dt>
             </dl>
            <dl id="reality">
             <dd>&nbsp;</dd>

            </dl>
            <dl>
               <dd>&nbsp;</dd>
               <dt>
                   <input type="submit" value="转账" />
               </dt> 
            </dl>
          </div>
        </div>
      </form>
      </div>
    </div>
    


<style type="text/css">body{font-family:"Microsoft YaHei";}</style>
<div class="account_bottom" align="center" style="margin: 0 auto;background: #f9f9f9;height: 80px;">
     <table align="center" width="100%" style="font-size: 12px;margin-top: 5px; color: #b4b4b4;">
     	<tr>
     		<td align="center">
     			电子报告实习-元奎渊 61202107
     		</td>
     		<td style="display: none;">&nbsp;&nbsp;

     		</td>
     	</tr>
     
     </table>
</div> 
</div>
</body>
</html>
